package com.legendshop.openportal.sdk.client.http;

import cn.hutool.json.JSONObject;

/**
 * @author jzh
 * @version 1.0.0
 * @title HttpResponseAnalyzerContext
 * @date 2024/6/19 15:29
 * @description：http响应解析上下文
 */
public class HttpResponseAnalyzerContext {

    private static final ThreadLocal<JSONObject> THREAD_LOCAL = new ThreadLocal<>();

    private HttpResponseAnalyzerContext() {}

    public static JSONObject get() {
        return THREAD_LOCAL.get();
    }

    public static void set(JSONObject jsonObject) {
        THREAD_LOCAL.set(jsonObject);
    }

    public static void clear() {
        THREAD_LOCAL.remove();
    }
}
